import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpNotice {
  id!: number;
  title!: string;
  content!: unknown;
  state: boolean = true;
  addTime!: string;
  updateTime!: string;
  sort: number = 0;
  uniacid!: number;
}

export const ImsYzdKpNoticeSchema = new EntitySchema({
  class: ImsYzdKpNotice,
  properties: {
    id: { primary: true, type: 'number' },
    title: { type: 'string', length: 255 },
    content: { type: 'unknown', columnType: 'longtext' },
    state: { type: 'boolean', default: true },
    addTime: { type: 'string', length: 255 },
    updateTime: { type: 'string', length: 255 },
    sort: { type: 'number', default: 0, index: 'sort' },
    uniacid: { type: 'number', index: 'uniacid' },
  },
});
